/*
 *  Copyright (C) 2010 Matthias Buch-Kromann <mbk.isv@cbs.dk>
 * 
 *  This file is part of the MatrixParser package.
 *  
 *  The MatrixParser program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 * 
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.osdtsystem.incparser.featureextraction.intlist;

/**
 *
 * @author Matthias Buch-Kromann <mbk.isv@cbs.dk>
 */
public final class IntList3 extends AbstractIntList {
    int group = 0;
    int f1 = 0, f2 = 0, f3 = 0;

    public IntList3() {
    }

    public IntList3 set(int group, int f1, int f2, int f3) {
        this.group = group;
        this.f1 = f1;
        this.f2 = f2;
        this.f3 = f3;
        return this;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final IntList3 other = (IntList3) obj;
        if (this.group != other.group) {
            return false;
        }
        if (this.f1 != other.f1) {
            return false;
        }
        if (this.f2 != other.f2) {
            return false;
        }
        if (this.f3 != other.f3) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 79 * hash + this.group;
        hash = 79 * hash + this.f1;
        hash = 79 * hash + this.f2;
        hash = 79 * hash + this.f3;
        return hash;
    }

    @Override
    public String toString() {
        StringBuilder s = new StringBuilder();
        s.append("[").append(group)
                .append(",").append(f1).append(",").append(f2)
                .append(",").append(f3)
                .append("]");
        return s.toString();
    }
}
